﻿@namespace  ERP.Abp.AntDesignUI

@typeparam TItem

@if (Visible && HasPermission)
{
    if (ParentActions.Type == ActionType.Dropdown)
    {
        if (!Primary)
        {
            <MenuItem Disabled="@Disabled" OnClick="@ActionClickedAsync">
                @Text
            </MenuItem>
        }
        else
        {
            <Button disabled="@Disabled"
                    Icon="@Icon"
                    Block="true"
                    Type="@Color"
                    OnClick="@ActionClickedAsync">
                @if (!string.IsNullOrEmpty(Icon))
                {
                    <Icon Name="@Icon"/>
                }
                @Text
            </Button>
        }
    }
}
